<%@ page contentType="text/html;charset=utf-8"%>
<%@ taglib prefix="cw" uri="/widget-tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<script type="text/javascript">
		//选中输入框时，默认选中其中内容
		function selectPeopleText(e){
			e.selectText(0,e.getRawValue().length);
		}
		function selectCheckPerson (combo, record, index){
			var aac058=record.get('aac058');
			if(aac058=='疑似错误' || aac058=='注销封存'){
				var menuId='${param.menuId}';
				Yzsb.util
				.request(
						'${pageContext.request.contextPath}/commons/checkMenuId.action',
						{
							menuid : menuId
						},
						'post',
						function(response, options) {
							var msg = response.responseText;
							selectAPerson(combo, record, index);
						},function(response, options) {
							var msg = response.responseText;
							Wonders.Msg.error('身份证类型为疑似错误或注销封存人员无法办理该业务!', '错误');

						});	
			}else{
				selectAPerson(combo, record, index);
			}
		
			
		}
		
</script>	
<table width="100%" >
	<tr>
		<td align="right" width="80">
			人员查询:
		</td>
		<td width="490">
			<c:url value="/commons/personSelect.action" var="AC_PERSON"></c:url>
			<cw:gridSelect id="personSelect_aac001" property="queryString" fields="['aac001','bac045','aac003','aac058','aae135','bke021','bke143','aae044','aac084','bab002','aab001','bac226','bac227','baz805','aac004']"
				width="484" url="${AC_PERSON}" title="" 
				emptyText="请输入个人代码、姓名或身份证,输入两个字后自动联想" displayField="aac003"
				valueField="aac001" pageSize="10" minChars="2" listWidth="720" 
				autoComplete="true" onSelect="selectCheckPerson" listeners="{focus:selectPeopleText}">
				<cw:gridSelectColumn width="80" property="bac045" header="个人代码" />
				<cw:gridSelectColumn width="80" property="aac058" header="证件类型" />
				<cw:gridSelectColumn width="120" property="aae135" header="证件号码" />
				<cw:gridSelectColumn width="60" property="aac003" header="姓名" />
				<cw:gridSelectColumn width="60" property="bke143" header="医保类型" />
				<cw:gridSelectColumn width="60" property="aae044" header="所属区" />
				<cw:gridSelectColumn width="80" property="bac226" header="原养老编号" />
				<cw:gridSelectColumn width="80" property="bac227" header="原医保编号" />
				<cw:gridSelectColumn width="80" property="baz805" header="省个人识别号" />
			</cw:gridSelect>
		</td>	
		<td width="80" align="center"><jsp:include page="/pages/pub/readIdCard.jsp"></jsp:include>
		</td>
		<td>
		<jsp:include page="/pages/pub/readcard.jsp"></jsp:include></td>
	</tr>
</table>
